package salesalert

import com.the6hours.grails.springsecurity.facebook.FacebookUserDomain

class User implements Serializable, FacebookUserDomain  {

	transient springSecurityService
	
	long uid
	String name
	String accessToken
	
	static hasMany = [attends: Attend]
	
    static constraints = {
		uid unique: true
		accessToken(nullable:true)
    }
	
	String getUsername() {
		return 'fb_' + this.uid
	}
	
	String toString() {
		return "FacebookCredential: uid=$uid"
	}

}
